#ifndef __MAIN_H
#define __MAIN_H
#include "sys.h"

#define SCB_AIRCR (*(__IO unsigned long *)0xE000ED0C) // Reset control Address Register
#define SCB_RESET_VALUE 0x05FA0004 // reset value ,write to SCB_AIRCR  can reset cpu
enum
{
    ware_null,
    Sine,
    Square,
    Triangle
};

enum
{
    OFF,
    ON
};

enum
{
    sleep,
    active
};

typedef struct
{
    u16 Amplitude;
    u16 Amplitude_1;
    u16 Freq;
    u8 wave;
    u8 out_0;
    u8 out_1;
    u8 screen_light;
    uint8_t CPU_usage;
    uint8_t wave_speed;
}DATA_Display;

extern DATA_Display Display;

typedef struct
{
    float freq;
    float Amplitude;
    u8 wave_mode;
    float freq_d;
}AD9833Struct;

extern AD9833Struct AD9833;

#endif
